import Vue from 'vue'

Vue.directive('img-width-height', function(el, binding) {
  if (el.naturalWidth < el.naturalHeight) {
    el.style.width = 'auto'
    el.style.height = '100%'
  } else {
    el.style.width = '100%'
    el.style.height = 'auto'
  }

  // console.log(el.naturalWidth, el.naturalHeight)
})
